package com.amkai.aes.webservice.binary.objecthandler.vfs;

import java.io.Serializable;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.amkai.aes.aescommon.service.vfs.VfsJob;
import com.amkai.aes.aescommon.service.vfs.VfsResult;
import com.amkai.aes.server.vfs.VfsProvider;
import com.amkai.aes.webservice.binary.JobObjectHandler;

public class VfsHandler implements JobObjectHandler<VfsJob, Serializable, VfsResult> {
	private static final Log logger = LogFactory.getLog(VfsHandler.class);
	
	public VfsResult process(VfsJob job, Serializable object) throws Exception {
		VfsProvider vp = new VfsProvider();
		try {
			return vp.processJob(job, object);
		} catch (Throwable e) {
			logger.error("VfsHandler: ", e);
			throw new Exception(e);
		}
	}
	
}
